<nav class="breadcrumb" id="pathContainer">
    <i class="Hui-iconfont Hui-iconfont-weizhi"></i>
    <span>您的位置：</span>
    <span>系统配置</span>
    <span class="c-999 en">&gt;</span>
    <span>用户管理</span>
    <span class="c-999 en">&gt;</span>
    <span class="c-primary">添加用户信息</span>
    <div class="f-r">
        <input class="btn btn-default size-S radius f-r mr-30 mt-5" type="button" id="gobackFromEdit" value="返回">
    </div>
</nav>
<div class="Hui-article mt-10" id="userDetail">
    <form class="form form-horizontal responsive" id="userForm" novalidate="novalidate">
    </form>
</div>
<!--等级管理-->
<div class="cover-div cover-show2 ">
    <div class="Hui-article mt-10 content-div2" id="main">
        <div class="eva-h2">
            <i class="Hui-iconfont Hui-iconfont-fenlei"></i>
            <span class="c-primary">等级管理</span>
            <span class="close_btn fr">X</span>
        </div>
        <table class="table table-border table-bordered">
            <thead class="text-c row cl table-bgcolor-gary" id="thead">
                <tr>
                    <th width="100">序号</th>
                    <th>等级名称</th>
                    <th width="150">操作</th>
                </tr>
            </thead>
            <tbody class="text-c row cl" id="tbody"></tbody>
        </table>
        <div id="layPage" class="text-c mt-20 data-cache"></div>
    </div>
    <script id="userList" type="text/x-handlebars-template">
        \{{#each result}}
        <tr>
            <td>\{{Math @index '+' '1'}}</td>
            <td>\{{name}}</td>
            <td width="150" level="\{{level}}" levelId="\{{id}}" data-name="\{{name}}">
                <button type="button" class="btn btn-primary size-S radius ensure_btn">确定</button>
            </td>
        </tr>
        \{{/each}}
    </script>
</div>
<!--地区管理-->
<div class="cover-div cover-show">
    <div class="Hui-article mt-10 content-div2" id="main">
        <div class="eva-h2" id="areaTitle">
            <i class="Hui-iconfont Hui-iconfont-fenlei"></i>
            <span class="c-primary">地区管理</span>
            <span class="close_btn fr">X</span>
        </div>
       <div class="conditionBox col-sm-2 w-210 show">
           <label for="" class="areaName">村名:</label>
           <input type="text" class="input-text radius pointer w-170" placeholder="请输入地区名" name="keyword" id="keyword" />
       </div>
       <div class="clearfix btn-div show">
           <input type="button" class="btn btn-primary queryBtn btn-secondary float-left mr-4 ml-10" value="查 询" />
       </div> 
        <table class="table table-border table-bordered" id="areaTable">
            <thead class="text-c row cl table-bgcolor-gary" id="thead">
                <tr>
                    <th width="100">序号</th>
                    <th>地区名称</th>
                    <th width="150">操作</th>
                </tr>
            </thead>
            <tbody class="text-c row cl" id="tbodyArea"></tbody>
        </table>
        <div id="layPage" class="text-c mt-20 data-cache"></div>
    </div>
    <script id="userListArea" type="text/x-handlebars-template">
        \{{#each result}}
        <tr>
            <td>\{{Math @index '+' '1'}}</td>
            <td>\{{area}}</td>
            <td width="150" areaId="\{{id}}" areaName="\{{area}}">
                <button type="button" class="btn btn-primary size-S radius ensure_btn">确定</button>
            </td>
        </tr>
        \{{/each}}
    </script>
    <script id="userListArea2" type="text/x-handlebars-template">
        \{{#each result}}
        <tr>
            <td>\{{Math @index '+' '1'}}</td>
            <td>\{{area}}</td>
            <td width="150" areaId="\{{id}}" areaName="\{{area}}">
                <button type="button" class="btn btn-primary size-S radius ensure_btn">确定</button>
            </td>
        </tr>
        \{{/each}}
    </script>
</div>
<!-- localHbs -->
<script id="userMsg" type="text/x-handlebars-template">
    <div class="row cl">
        <label class="form-label col-1">用户名：</label>
        <div class="formControls col-2">
            <input type="text" class="hidden" \{{#if detail}}disabled="disabled" \{{/if}} name="id" value="\{{user.id}}">
            <input type="text" disabled="disabled" id="username" class="input-text mccms-validate-rangelength?[5,20] mccms-validate-required" name="username" autocomplete="off" value="\{{user.username}}" placeholder="用户名">
        </div>
        
    </div>
    \{{#if add}}{{!-- 
        <p id="unameTip"></p> --}}
        <div class="row cl">
            <label class="form-label col-1">密码：</label>
            <div class="formControls col-2">
                {{!--
                <input type="password" class="eva-hidden"> --}}
                <input type="password" class="input-text mccms-validate-rangelength?[6,20]  mccms-validate-required" name="password" autocomplete="off" placeholder="请输入密码">
            </div>
        </div>
        \{{/if}}
    <div class="row cl">
        <label class="form-label col-1">真实姓名：</label>
        <div class="formControls col-2">
            <input type="text" class="input-text mccms-validate-required mccms-validate-stringCheck2" \{{#if detail}}disabled="disabled" \{{/if}} name="realName" autocomplete="off" value="\{{user.realName}}" placeholder="请输入真实姓名">
        </div>
    </div>
    <div class="row cl">
        <label class="form-label col-1" for="tips">所属角色：</label>
        <div class="formControls skin-minimal col-8" id="role">
            \{{#if detail}} 
                \{{#each role.resultList}}
                <div class="radio-box mb-5">
                    <input type="radio" id="role\{{id}}" disabled="disabled" name="roleId" value="\{{id}}">
                    <label for="role\{{id}}">\{{name}}</label>
                </div>
                \{{/each}} 
                \{{else}} 
                \{{#each role.resultList}}
                <div class="radio-box mb-5">
                    <input type="radio" id="role\{{id}}" name="roleId" value="\{{id}}">
                    <label for="role\{{id}}">\{{name}}</label>
                </div>
                \{{/each}} 
            \{{/if}}
        </div>
    </div>
    <div class="row c1">
        <label class="form-label col-1">用户类型：</label>
        <div class="formControls col-1">
            <select class="select-box select" \{{#if detail}}disabled="disabled" \{{/if}} id="type" name="type" size="1">
                \{{#mccmsSelect user.type}}
                <option value="管理员">管理员</option>
                <option value="政府人员">政府人员</option>
                <option value="帮扶人员">帮扶人员</option>
                <option value="贫困户">贫困户</option>
                \{{/mccmsSelect}}
            </select>
        </div>
    </div>
    <div class="row cl">
        <label class="form-label col-1">等級：</label>
        <div class="formControls col-2">
            <input type="text" class="input-text" \{{#if detail}}disabled="disabled" \{{/if}} id="grade" autocomplete="off" placeholder="请选择等级" required value='\{{user.userLevel.name}}' />
            <input type="hidden" name="userlevelid" value="\{{user.userLevel.id}}" id="h-grade" level="\{{user.userLevel.level}}">
        </div>
    </div>
    <div class="row cl area-div">
        <label class="form-label col-1">地区：</label>
        <div class="formControls col-2">
            <input type="text" class="input-text mccms-validate-stringCheck4" \{{#if detail}}disabled="disabled" \{{/if}} id="area" autocomplete="off" placeholder="请选择地区" \{{#mccmsShowIfEqual user.userLevel.level '4'}} value='\{{user.cry}}' \{{/mccmsShowIfEqual}} \{{#mccmsShowIfEqual user.userLevel.level '5'}} value='\{{user.name}}' \{{/mccmsShowIfEqual}} \{{#mccmsShowIfEqual user.userLevel.level '0'}} value='\{{user.name}}' disabled="disabled" \{{/mccmsShowIfEqual}} \{{#mccmsShowIfEqual user.userLevel.level '1'}} value='\{{user.province}}' \{{/mccmsShowIfEqual}} \{{#mccmsShowIfEqual user.userLevel.level '2'}} value='\{{user.city}}' \{{/mccmsShowIfEqual}} \{{#mccmsShowIfEqual user.userLevel.level '3'}} value='\{{user.cty}}' \{{/mccmsShowIfEqual}}/>
            <input type="hidden" name="areaId" value="\{{user.areaId}}" id="h-area">
        </div>
    </div>
    <div class="row cl">
        <label class="form-label col-1" for="mobilePhone">联系电话：</label>
        <div class="formControls col-2" style="margin-bottom:10px">
            <input type="text" class="input-text mccms-validate-required isMobile2" \{{#if detail}}disabled="disabled" \{{/if}} name="mobilePhone" autocomplete="off" value="\{{user.mobilePhone}}" placeholder="请输入手机号码">
        </div>
    </div>
    <div class="row cl">
        <label class="form-label col-1">邮箱：</label>
        <div class="formControls col-2">
            <input type="text" class="input-text mccms-validate-email" \{{#if detail}}disabled="disabled" \{{/if}} name="email" autocomplete="off" value="\{{user.email}}" placeholder="请输入邮箱">
        </div>
    </div>

    <div class="row c1">
        <label class="form-label col-1" for="status">状态：</label>
        <div class="formControls col-1">
            <select class="select-box select" \{{#if detail}}disabled="disabled" \{{/if}} id="status" name="status" size="1">
                \{{#mccmsSelect user.status}}
                <option value="1">启用</option>
                <option value="0">停用</option>
                \{{/mccmsSelect}}
            </select>
        </div>
    </div>
    <div class="row c1">
        <label class="form-label col-1" for="status">审核状态：</label>
        <div class="formControls col-1">
            <select class="select-box select" style="width:120%" \{{#if detail}}disabled="disabled" \{{/if}} id="checkState" name="checkState" size="1">
                \{{#mccmsSelect user.checkState}}
                <option value="已审核">已审核</option>
                <option value="未审核">未审核</option>
                <option value="审核不通过">审核不通过</option>
                \{{/mccmsSelect}}
            </select>
        </div>
    </div>
    <div class="row cl">
        <label class="form-label col-1">备注：</label>
        <div class="formControls col-2">
            <textarea class="input-text" \{{#if detail}}disabled="disabled" \{{/if}} name="remarks" autocomplete="off" maxlength="255" value="\{{user.remarks}}" placeholder="请输入最多255个字符...">\{{user.remarks}}</textarea>
        </div>
    </div>
    <div class="row cl \{{#if detail}}hidden\{{/if}}">
        <div class="col-10 col-offset-1">
            <input class="btn btn-primary radius sub_btn" type="button" value="保存">
        </div>
    </div>
</script>
<script>
new new_userMsgEdit();
</script>